package com.gaattc.dao;

import com.gaattc.model.Goods;
import com.gaattc.model.GoodsSpecs;
import com.gaattc.model.User;
import com.gaattc.model.bo.AddSpecsBO;
import com.gaattc.model.bo.AddTypeBO;
import com.gaattc.model.bo.AskGoodsMsgBO;
import com.gaattc.model.vo.*;

import java.util.List;

public interface GoodsDao {
    List<GoodsTypeVO> getType();

    List<GetGoodsByTypeVO> getGoodsByType(int typeId);

    int addType(AddTypeBO addTypeBO);

    int deleteType(int typeId);

    int deleteGoods(int id);

    void addGoods(Goods goods);

    int getLastId();

    void addSpecs(List<AddSpecsBO> specList, int goodsId);

    void addSpecs(List<GoodsSpecs> specList);

    Goods getGoodsInfo_Goods(int id);

    List<GoodsSpecs> getGoodsInfo_Specs(int id);

    void deleteSpec(GoodsSpecs goodsSpecs);

    List<MsgVO> msg(int state);

    void reply(MsgVO msgVO);

    List<GetGoodsByTypeVO> getAllGoodsByType();

    List<GetGoodsMsgVO> getGoodsMsg(int id);

    String getAsker(int userId);

    UserGetGoodsInfoVO userGetGoodsInfo(int id);

    List<CommentVO> getGoodsComment(int goodsId);

    Double getAvgScore(int goodsId);

    List<GetGoodsByTypeVO> searchGoods(String keyword);
    
    User getUser(String token);

    void askGoodsMsg(AskGoodsMsgBO askGoodsMsgBO, int userId);

}
